<?php include("protect2.php") ?>

<STYLE type=text/css>.blank {
	FONT-SIZE: 0px; WIDTH: 0px; HEIGHT: 0px
}
TD {
	FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
INPUT {
	FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.present {
	FONT-WEIGHT: bold; BACKGROUND-COLOR: #dee5ec
}
.h1 {
	FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #ffffff
}
.d1 {
	COLOR: #c0c0c0
}
.link {
	FONT-WEIGHT: bold; FONT-SIZE: 12px; CURSOR: hand; COLOR: #ffffff; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.footer {
	FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.footer1 {
	FONT-WEIGHT: bold; FONT-SIZE: 10px; BACKGROUND-IMAGE: url(chat/images/menu_b.gif); CURSOR: default; COLOR: #000000; BORDER-BOTTOM: 0px
}
.header {
	FONT-WEIGHT: bold; FONT-SIZE: 10px; BACKGROUND-IMAGE: url(chat/images/menu_h.gif); CURSOR: default; COLOR: #000000; BORDER-BOTTOM: 0px
}
.textcol {
	FONT-SIZE: 12px; COLOR: #2378d5; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
</STYLE>

<?php
	include("header_admin.html");
	include("connect.php");
	$pilih=mysql_select_db("uwika_krs",$conn);
	echo "<br><BR>";
	echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Daftar Penawaran Mata Kuliah :";
	echo "<br><br>";
	echo "<table width=\"100%\" border=\"0\">";
	echo "<table align=center width=\"700\" border=\"1\">";
	echo "<tr>";
	echo "<td width=\"50\"><center>N R P</center></td>";
	echo "<td width=\"200\"><center>N A M A &nbsp; M A H A S I S W A </center></td>";
	echo "<td width=\"25\"><center>SEMESTER</center></td>";
	echo "<td width=\"25\"><center>PERIODE</center></td>";
	echo "<td width=\"25\"><center>I P S</center></td>";
	echo "<td width=\"25\"><center>TOLERANSI</center></td>";
	echo "</tr>";

	$sqlstr="SELECT ips.nrp,biodata.nama,ips.semester,ips.periode,ips.ips,ips.toleransi FROM ips,biodata where ips.nrp=biodata.nrp and biodata.dosenwali='$reg_uname'";
	$hasil=mysql_query($sqlstr);
	$row = mysql_fetch_row($hasil);
	do {
		list($nrp,$nama,$sesi,$periode,$ips,$toleransi) = $row;
		if (empty($nrp)) {
		echo "<BR>";
		break;
		} 
		echo "<tr><td width=\"50\"><center> $nrp </center></td>";
		echo "<td width=\"200\"> $nama </td>";
		echo "<td width=\"25\"><center> $sesi </center></td>";
		echo "<td width=\"25\"><center> $periode </center></td>";
		echo "<td width=\"25\"><center> $ips </center></td>";
		echo "<td width=\"25\"><center> $toleransi </center></td>";
		echo "</tr>";
	} while ($row=mysql_fetch_row($hasil));
	echo "</table></table>";
	echo "<br><Br>";

	echo "<table width=\"100%\" border=\"0\">";
	
	$pilih=mysql_select_db("uwika",$conn);
	echo "<form name=\"frmdaftar\" method=\"post\" action=\"tolsks3.php\">";
	echo "<tr>";
	echo "<td width=\"5%\"></td>";
	echo "<td>N R P : ";
	echo "<input name=\"tolnrp\" type=\"text\" size=\"9\"></td></tr>";
	echo "<td width=\"5%\"></td><td>Semester : ";
	echo "<select name=\"sel_sesi\">";
	echo "<option>GASAL</option><option>GENAP</option>";
    echo "</select>";
	echo " Periode : ";
	echo "<select name=\"sel_periode\">";
	$sqlstr="SELECT distinct periode FROM penawaran";
	$hasil=mysql_query($sqlstr);
	$row = mysql_fetch_row($hasil);
    do {
		list($periode) = $row;
		echo "<option>";
		echo $periode;
		echo "</option>";
	} while ($row=mysql_fetch_row($hasil));
    echo "</select></td></tr>";
 	echo "<tr><td width=\"5%\"></td><td>Toleransi SKS : ";
	echo "<input name=\"tolsks\" type=\"text\" size=\"2\" value=\"0\"></td><tr></table>";
	echo "<br>";
	echo "<table width=\"100%\" border=\"0\">";
	echo "<tr><td width=\"5%\"></td>";
	echo "<td width=\"5%\"><input name=\"Submit\" type=\"submit\" value=\"Daftar\">";
	echo "</form></td>";
	echo "<td><form name=\"frmbatal\" method=\"post\" action=\"adminpage.php\">";
	echo "<input type=\"button\" value=\"Batal\" onClick=\"javascript: history.go(-1)\">" . "</td></tr>";
	echo "</form>";
	echo "</table>";
	echo "<br><br>";

	include("footer.php");
?>